package cn.gjculture.shopping.api.dao;

import cn.gjculture.shopping.api.entity.RoutingRule;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface RoutingRuleDao {

    @Insert("insert into routingrule(routingRuleId,goodsId,sonMerNo,rootIn,routeType,`value`) " +
            "values(#{routingRuleId},#{goodsId},#{sonMerNo},#{rootIn},#{routeType},#{value})")
    int insert(RoutingRule routingRule);

    @Select("select * from routingrule where goodsId=#{goodsId}")
    List<RoutingRule> queryByGoodsId(String goodsId);
}
